<title>找回密码</title>
<style>
    .a{
        width:500px;
        height:300px;
        margin:20px auto;
        background-color:lavender;
        line-height:30px;
        border-radius: 40px;
        padding-left:50px;
        padding-top:20px;
    }
 

    </style>
    <div class=a>
<h2>找回密码</h2>
<form action="#" method="post">
    您的用户名是：<input type=text name=username  placeholder="请输您注册时的用户名" /><br/>
您注册的邮箱邮箱是：<input type=email  name=email size="20" placeholder="请输您注册时的邮箱" /><br/>
   密保是：<input type=text name=encrypted size="20" placeholder="请输您注册时的密保"  /><br/>
    <input type="submit" name="submit"  value="确定"  /><br/>
</form>
</div>
<?php
header("content-type:text/html; charset=utf-8");
if(isset($_POST['submit'])){
$name=$_POST['username'];
$email=$_POST['email'];
$encrypteds=$_POST['encrypted'];
  if($name=="" && $email=="" && $encrypteds=="" ){
die('请输入用户名，邮箱以及密保！');  
}
$serverLink=@mysql_connect("localhost","root","root") or die("连接服务器失败！程序中断");
mysql_query("set names 'utf-8'");
$dbLink= @mysql_select_db("supermarket") or die("打开supermarket数据库失败！程序中断");
$selectsign="select * from admsign where admname='$name' and email='$email' and encrypted='$encrypteds' ";
$sqlsgin=mysql_query($selectsign);
$a=mysql_fetch_assoc($sqlsgin);
if($a!=""){
echo "您的密码是：". $a['password'];
}else{
    echo "您输入的信息有误！查询不到您的密码........";
}
mysql_free_result($sqlsgin);
mysql_close($serverLink);
}


?>